
package com.pp.admin.common.client;

public class PermissionCheck {
	
	public static final String	APP_DOMAIN			= "PP-ADMIN";
	
	/*
	 * Domain Tab permissions
	 */
	public static final String	DOMAIN_PAGE			= APP_DOMAIN + ".DOMAIN";
	
	/*
	 * User tab Permissions
	 */
	public static final String	USER_PAGE			= APP_DOMAIN + ".USER";
	
	/*
	 * Admin Tabe Permissions
	 */
	public static final String	ADMIN_TAB			= APP_DOMAIN + ".ADMIN";
	
	public static final String	DOMAIN_USER_PAGE	= ADMIN_TAB + ".DOMAINUSER";
	
	public static final String	ROLE_PAGE			= ADMIN_TAB + ".ROLE";
	
	public static final String	PERMISSION_PAGE		= ADMIN_TAB + ".PERMISSION";
	
	public PermissionNode		rootNode			= null;
	
	public PermissionCheck( PermissionNode node ) {

		rootNode = node;
	}
	
	public boolean check( String permission ) {

		return rootNode.checkPermission( permission );
	}
	
}
